package com.school.graduation.model;

import java.io.Serializable;

import cn.bmob.v3.BmobObject;

/**
 * 订单信息
 * Created by U-nookia on 2016/12/20.
 */
public class Order extends BmobObject implements Serializable{

    public static final int NEW = 0;                      //未交易
    public static final int COMMIT_ORDER = 1;             //买家提交订单
    public static final String COMMIT_ORDER_STR = "买家已下单，等待付款";
    public static final int CANCEL_ORDER_SELLER = 2;      //卖家取消订单
    public static final String CANCEL_ORDER_SELLERSTR = "卖家已取消订单";
    public static final int CANCEL_ORDER_BUYER = 3;       //买家取消订单
    public static final String CANCEL_ORDER_BUYER_STR = "买家已取消订单";
    public static final int BUYYER_PAY = 4;               //买家确认支付
    public static final String BUYYER_PAY_STR = "买家已付款，等待商家确认";
    public static final int RECEIVE_MONEY = 5;            //卖家确认收款
    public static final String RECEIVE_MONEY_STR = "卖家已确认收款";
    public static final int DEAL_FINISH = 6;              //交易成功
    public static final String DEAL_FINISH_STR = "交易成功";


    private int uuid;        //订单id
    private Student studentOrder; //支付人
    private Goods goods;          //物品
    private int condition;        //订单状态
    private String logisticsNum;  //物流编号
    private String orderTime;    //下单时间
    private float money;    // 订单金额

    public float getMoney() {
        return money;
    }

    public void setMoney(float money) {
        this.money = money;
    }

    public int getCondition() {
        return condition;
    }

    public void setCondition(int condition) {
        this.condition = condition;
    }

    public Goods getGoods() {
        return goods;
    }

    public void setGoods(Goods goods) {
        this.goods = goods;
    }

    public String getLogisticsNum() {
        return logisticsNum;
    }

    public void setLogisticsNum(String logisticsNum) {
        this.logisticsNum = logisticsNum;
    }

    public String getOrderTime() {
        return orderTime;
    }

    public void setOrderTime(String orderTime) {
        this.orderTime = orderTime;
    }

    public Student getStudentOrder() {
        return studentOrder;
    }

    public void setStudentOrder(Student studentOrder) {
        this.studentOrder = studentOrder;
    }

    public int getUuid() {
        return uuid;
    }

    public void setUuid(int uuid) {
        this.uuid = uuid;
    }

    @Override
    public String toString() {
        return "Order{" +
                "uuid=" + uuid +
                ", studentOrder=" + studentOrder +
                ", goods=" + goods +
                ", condition=" + condition +
                ", logisticsNum='" + logisticsNum + '\'' +
                ", orderTime='" + orderTime + '\'' +
                ", money=" + money +
                '}';
    }
}
